﻿@page "/authentication/{action}"
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Volo.Abp.AspNetCore.Components.Web.Security
@using Volo.Abp.AspNetCore.Components.WebAssembly
<RemoteAuthenticatorView Action="@Action" OnLogInSucceeded="OnLogInSucceeded" OnLogOutSucceeded="OnLogOutSucceeded" />
@inject WebAssemblyCachedApplicationConfigurationClient WebAssemblyCachedApplicationConfigurationClient
@code{
    [Parameter] public string Action { get; set; }

    private async Task OnLogInSucceeded(RemoteAuthenticationState state)
    {
        await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync();
    }

    private async Task OnLogOutSucceeded(RemoteAuthenticationState state)
    {
        await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync();
    }
}
